<template>
    <view class="w-full h-full bg-white" >
        <view class=" new-card flex flex-row  px-[20rpx] py-[32rpx]" v-for="(item, index) in list"
        :key="index">
        <view>
            <image class="w-[240rpx] h-[180rpx]" :src="item.imgUrl" mode="scaleToFill" />
        </view>
        <view class="news-card-content flex flex-col justify-between ml-[20rpx] ">
            <view>
                <view class="text-base news-card-content-title">
                    <text>{{ item.title }}</text>
                </view>
                <view class=" news-card-content-intro text-sm text-gray-400 mt-[16rpx]">
                    <text>{{ item.description }}</text>
                </view>
            </view>
            <view class="flex flex-row justify-between items-center text-disabled text-sm w-full">
                <view>
                    <text>{{ item.createTime }}</text>
                </view>
                <view class="flex items-center">
                    <!-- <image
                            src="@/static/images/icon/icon_visit.png"
                            class="w-[30rpx] h-[30rpx]"
                        ></image> -->
                    <view class="ml-[10rpx]">{{ item.viewCount }}</view>
                </view>
            </view>
        </view>
    </view>
    </view>
</template>
<script setup lang="ts">
defineOptions({
    name: 'ArticleCard'
})
const list = ref([
    {
        title: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        description: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        createTime: '2025年4月13日21:20:16',
        viewCount: 1728,
        imgUrl: "https://img.tukuppt.com/ad_preview/00/20/23/5c9a118f33ecf.jpg!/fw/780"
    },
    {
        title: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        description: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        createTime: '2025年4月13日21:20:16',
        viewCount: 1728,
        imgUrl: "https://img.tukuppt.com/ad_preview/00/20/23/5c9a118f33ecf.jpg!/fw/780"
    },
    {
        title: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        description: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        createTime: '2025年4月13日21:20:16',
        viewCount: 1728,
        imgUrl: "https://img.tukuppt.com/ad_preview/00/20/23/5c9a118f33ecf.jpg!/fw/780"
    },
    {
        title: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        description: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        createTime: '2025年4月13日21:20:16',
        viewCount: 1728,
        imgUrl: "https://img.tukuppt.com/ad_preview/00/20/23/5c9a118f33ecf.jpg!/fw/780"
    },
    {
        title: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        description: '撒会计分录受打击了副科级送达了开发机手打拉卡',
        createTime: '2025年4月13日21:20:16',
        viewCount: 1728,
        imgUrl: "https://img.tukuppt.com/ad_preview/00/20/23/5c9a118f33ecf.jpg!/fw/780"
    },
])
</script>
<style scoped lang="scss">
.news-card {
    border-bottom: 1px solid #f8f8f8;

    &-content {
        &-title {
            -webkit-line-clamp: 2;
            overflow: hidden;
            word-break: break-all;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
        }

        &-intro {
            -webkit-line-clamp: 1;
            overflow: hidden;
            word-break: break-all;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
        }
    }
}
</style>